package org.base.mode.service.impl;

import org.base.mode.entity.Test;
import org.base.mode.mapper.TestMapper;
import org.base.mode.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 业务层接口实现类
 * CRC
 * 2022/2/5
 */
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestMapper testMapper;

    /**
     * 获取数据列表
     *
     * @param test
     * @return
     */
    @Override
    public List<Test> getTestList(Test test) {
        return testMapper.getTestList(test);
    }

    /**
     * 保存数据
     *
     * @param test
     */
    @Override
    public void saveTest(Test test) {
        testMapper.saveTest(test);
    }

    /**
     * 更新数据
     *
     * @param test
     */
    @Override
    public void updateTest(Test test) {
        testMapper.updateTest(test);
    }

    /**
     * 删除数据
     *
     * @param id
     */
    @Override
    public void deleteTestById(int id) {
        testMapper.deleteTestById(id);
    }
}
